<template>
	<div class="small-video">
    	<transition name="router-fade" mode="out-in">
			<keep-alive>
			    <router-view v-if="$route.meta.keepAlive"></router-view>
			</keep-alive>
    	</transition>
    	<transition name="router-fade" mode="out-in">
			<router-view v-if="!$route.meta.keepAlive"></router-view>
		</transition>
    	<foot-guide v-if="!$route.meta.footer"></foot-guide>
		<svg-icon></svg-icon>
	</div>
</template>

<script>
	import svgIcon from './components/common/svg';
	import footGuide from '@/components/footer/footGuide'
    import {mapState, mapActions} from 'vuex'
	export default {
		name: 'small-video',
		components:{
			svgIcon,
			footGuide
		},
        mounted(){
            //获取用户信息
            this.getUserInfo();

        },
		computed: {
            ...mapState([
                'userInfo'
            ]),
        },
        methods: {
            ...mapActions([
                'getUserInfo'
            ]),
        },
	}
</script>

<style lang="scss">
	@import './style/common';
	.router-fade-enter-active, .router-fade-leave-active {
		transition: opacity .3s;
	}
	.router-fade-enter, .router-fade-leave-active {
		opacity: 0;
	}
</style>
